package com.java_foundation.huawei.Test_13;

import java.util.Arrays;
import java.util.Scanner;

/**
 * @program: java_foundation
 * @description: 给定n个字符串，请对n个字符串按照字典序排列。
 * @author: xiongbangwen <Email>xiongbangwen@163.com</Email>
 * @create: 2020-08-03 00:16
 **/
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int num = sc.nextInt();
            String[] strArr = new String[num];
            for (int i = 0; i < num; i++) {
                strArr[i] =  sc.next();
            }
            Arrays.sort(strArr);
            for (int i = 0; i < num; i++) {
                System.out.println(strArr[i]);
            }
        }
    }
}
